﻿using System;
using System.Collections.Generic;
using System.Text;

namespace suirui.ZhuMu.Common
{
    public static class AutoMapperMethod
    {
        /// <summary>
        /// AutoMapper 必须先创建映射
        /// </summary>
        /// <param name="dictionary"></param>
        public static void Init(Dictionary<Type, Type> dictionary)
        {
            //AutoMapper.Mapper.Initialize(x =>
            //{
            //    foreach (var item in dictionary)
            //    {
            //        x.CreateMap(item.Key, item.Value);
            //    }
            //});
        }


       // public static TModel Trans<TModel, TModelDto>(TModelDto dto)
       //                    where TModel : class
       //where TModelDto : class
       // {
       //     return AutoMapper.Mapper.Map<TModelDto, TModel>(dto);
       // }
    }
}
